package com.sunnuwell.demo.common.utils;

import com.sunnuwell.demo.entity.Resource;

import java.util.HashSet;
import java.util.List;

/**
 * @program: entry
 * @description: list去重
 * @author: Mr.lv
 * @create: 2019-04-29 09:52
 **/
public class ListOnceUtils {
    public static List<Resource> removeDuplicate(List<Resource> resources) {
        HashSet h = new HashSet(resources);
        resources.clear();
        resources.addAll(h);
        return resources;
    }
}